<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>回到顶部效果</title>
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
</head>
<body>
	<div style="height:800px">1111111111111111111111111111111111111111111111111111111111111111111111111111111</div>
	<button>点击上面</button>




	<script type="text/javascript">
		$(function(){
  $("button").click(function() {
      $("html,body").animate({scrollTop:0}, 500);
  }); 
 })
	</script>
</body>
</html>
